import request from '@/utils/request'

// 查询神椰打卡活动列表
export function punchActivityList(query) {
  return request({
    url: '/shenye/punch/activity/list',
    method: 'get',
    params: query
  })
}
// 编辑神椰打卡活动状态[上架-下架]
export function punchActivityStatus(params) {
  return request({
    url: '/shenye/punch/activity/status',
    method: 'put',
    params
  })
}
// 查询第三方商品下拉框
export function activitySelect(params) {
  return request({
    url: '/shenye/punch/activity/select',
    method: 'get',
    params
  })
}
// 查询活动店铺下拉框
export function activityShopSelect(params) {
  return request({
    url: '/shenye/punch/activity/shop/select',
    method: 'get',
    params
  })
}
// 新增神椰打卡活动
export function addShenyePunchActivity(data) {
  return request({
    url: '/shenye/punch/activity',
    method: 'post',
    data
  })
}
// 查询神椰打卡活动详情
export function shenyePunchDetail(id) {
  return request({
    url: '/shenye/punch/activity/detail/' + id,
    method: 'get',
  })
}
// 编辑神椰打卡活动
export function updateShenyePunchActivity(data) {
  return request({
    url: '/shenye/punch/activity',
    method: 'put',
    data: data
  })
}
// 查询活动行业下拉框
export function activityIndustrySelect(params) {
  return request({
    url: '/shenye/punch/activity/industry/select',
    method: 'get',
    params
  })
}
// 查询神椰奖池列表
export function jackpotList(data) {
  return request({
    url: '/shenye/punch/jackpot/list',
    method: 'post',
    data
  })
}
// 查询核销店铺下拉框
export function jackpotShopList(query) {
  return request({
    url: '/shenye/punch/jackpot/shop/list',
    method: 'get',
    params: query
  })
}
// 查询神椰奖池统计数据
export function jackpotStatistics(data) {
  return request({
    url: '/shenye/punch/jackpot/statistics',
    method: 'post',
    data
  })
}
// 查询神椰奖池配置
export function jackpotDetail(id) {
  return request({
    url: '/shenye/punch/jackpot/detail/' + id,
    method: 'get',
  })
}
// 编辑神椰奖池配置
export function updatePushJackpot(data) {
  return request({
    url: '/shenye/punch/jackpot',
    method: 'put',
    data: data
  })
}
// 查询神椰奖池分配列表
export function jackpotAwardLs(params) {
  return request({
    url: '/shenye/punch/jackpot/award/list',
    method: 'get',
    params
  })
}
// 修改奖励数量
export function updateJackpotAwardAmount(params) {
  return request({
    url: '/shenye/punch/jackpot/award/amount',
    method: 'put',
    params
  })
}
//删除奖励记录
export function deleteJackpotAward(id) {
  return request({
      url: `/shenye/punch/jackpot/award/${id}`,
      method: 'DELETE',
  })
}
// 添加排行奖励
export function addJackpotAwardRank(data) {
  return request({
    url: '/shenye/punch/jackpot/award/rank',
    method: 'post',
    data
  })
}
// 添加随机奖励
export function addJackpotAwardRandom(data) {
  return request({
    url: '/shenye/punch/jackpot/award/random',
    method: 'post',
    data
  })
}
// 添加随机奖励
export function addJackpotAwardAssign(data) {
  return request({
    url: '/shenye/punch/jackpot/award/assign',
    method: 'post',
    data
  })
}
// 查询用户实名类型 1 已实名 2 未实名 3 未注册
export function jackpotAwardRealName(params) {
  return request({
    url: '/shenye/punch/jackpot/award/real/name',
    method: 'get',
    params
  })
}
// 确认开奖提示
export function jackpotAwardDrawHint(id) {
  return request({
    url: '/shenye/punch/jackpot/award/draw/hint/' + id,
    method: 'get',
  })
}
// 确认开奖提示
export function jackpotAwardDraw(id) {
  return request({
    url: '/shenye/punch/jackpot/award/draw/' + id,
    method: 'post',
  })
}
// 查询权益库存下拉框
export function inventorySelect(params) {
  return request({
    url: '/shenye/punch/activity/equity/inventory/select',
    method: 'get',
    params
  })
}
// 查询打卡活动NFR下拉
export function activityGetNFRSelect(params) {
  return request({
    url: '/shenye/punch/activity/getNFRSelect',
    method: 'get',
    params
  })
}
// 权益 释放库存
export function commodityDeactivate(params) {
  return request({
    url: '/shenye/punch/activity/commodity/deactivate',
    method: 'put',
    params
  })
}
// NFR释放库存
export function nfrDeactivate(params) {
  return request({
    url: '/shenye/punch/activity/nfr/deactivate',
    method: 'put',
    params
  })
}
//2023-5-18
// 查询通用权益库存下拉框
export function currentInventorySelect(query) {
  return request({
      url: `/common/v1/equity/inventory/select`,
      method: 'get',
      params:query
  })
}
